<?php
/**
 * Created by PhpStorm.
 * User: zhongyb
 * Date: 2016/6/6
 * Time: 16:14
 */
namespace common\entities\common;

use common\entities\ConfigEntity;
use Yii;

/**
 * This is the model class for table "myscrm_erpservice".
 *
 * @property string $ERPServiceId
 * @property string $OrganizationId
 * @property string $ServiceName
 * @property string $ServiceFriendlyName
 * @property string $AddressId
 * @property integer $ServiceCategory
 * @property string $myAsyncOperationId
 * @property string $CreatedOn
 * @property boolean $Enabled
 * @property string $Apiaddress
 * @property string $Applications
 */
class MyscrmErpserviceEntity extends ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_erpservice';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['ERPServiceId', 'OrganizationId', 'ServiceName', 'ServiceFriendlyName', 'ServiceCategory'], 'required'],
            [['ServiceCategory'], 'integer'],
            [['CreatedOn'], 'safe'],
            [['Enabled'], 'boolean'],
            [['ERPServiceId', 'OrganizationId', 'AddressId', 'myAsyncOperationId'], 'string', 'max' => 36],
            [['ServiceName', 'ServiceFriendlyName'], 'string', 'max' => 100],
            [['Apiaddress'], 'string', 'max' => 500],
            [['Applications'], 'string', 'max' => 4000]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ERPServiceId' => 'Erpservice ID',
            'OrganizationId' => 'Organization ID',
            'ServiceName' => 'Service Name',
            'ServiceFriendlyName' => 'Service Friendly Name',
            'AddressId' => 'Address ID',
            'ServiceCategory' => 'Service Category',
            'myAsyncOperationId' => 'My Async Operation ID',
            'CreatedOn' => 'Created On',
            'Enabled' => 'Enabled',
            'Apiaddress' => 'Apiaddress',
            'Applications' => 'Applications',
        ];
    }
}